package com.bestsoft.flow.service.impl;

import java.util.List;

import com.bestsoft.common.annotation.DataScope;
import com.bestsoft.common.core.domain.model.LoginUser;
import com.bestsoft.common.utils.DateUtils;
import com.bestsoft.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestsoft.flow.mapper.FlowGyslxLsMapper;
import com.bestsoft.flow.domain.FlowGyslxLs;
import com.bestsoft.flow.service.IFlowGyslxLsService;

/**
 * 供应商流向(连锁)Service业务层处理
 * 
 * @author 崔健
 * @date 2023-08-31
 */
@Service
public class FlowGyslxLsServiceImpl implements IFlowGyslxLsService 
{
    @Autowired
    private FlowGyslxLsMapper flowGyslxLsMapper;

    /**
     * 查询供应商流向(连锁)
     * 
     * @param id 供应商流向(连锁)主键
     * @return 供应商流向(连锁)
     */
    @Override
    public FlowGyslxLs selectFlowGyslxLsById(Long id)
    {
        return flowGyslxLsMapper.selectFlowGyslxLsById(id);
    }

    /**
     * 查询供应商流向(连锁)列表
     * 
     * @param flowGyslxLs 供应商流向(连锁)
     * @return 供应商流向(连锁)
     */
    @Override
    @DataScope(deptAlias = "a",userAlias = "b")
    public List<FlowGyslxLs> selectFlowGyslxLsList(FlowGyslxLs flowGyslxLs)
    {
        return flowGyslxLsMapper.selectFlowGyslxLsList(flowGyslxLs);
    }

    /**
     * 新增供应商流向(连锁)
     * 
     * @param flowGyslxLs 供应商流向(连锁)
     * @return 结果
     */
    @Override
    public int insertFlowGyslxLs(FlowGyslxLs flowGyslxLs)
    {
        flowGyslxLs.setCreateTime(DateUtils.getNowDate());
        return flowGyslxLsMapper.insertFlowGyslxLs(flowGyslxLs);
    }

    /**
     * 修改供应商流向(连锁)
     * 
     * @param flowGyslxLs 供应商流向(连锁)
     * @return 结果
     */
    @Override
    public int updateFlowGyslxLs(FlowGyslxLs flowGyslxLs)
    {
        flowGyslxLs.setUpdateTime(DateUtils.getNowDate());
        return flowGyslxLsMapper.updateFlowGyslxLs(flowGyslxLs);
    }

    /**
     * 批量删除供应商流向(连锁)
     * 
     * @param ids 需要删除的供应商流向(连锁)主键
     * @return 结果
     */
    @Override
    public int deleteFlowGyslxLsByIds(Long[] ids)
    {
        return flowGyslxLsMapper.deleteFlowGyslxLsByIds(ids);
    }

    /**
     * 删除供应商流向(连锁)信息
     * 
     * @param id 供应商流向(连锁)主键
     * @return 结果
     */
    @Override
    public int deleteFlowGyslxLsById(Long id)
    {
        return flowGyslxLsMapper.deleteFlowGyslxLsById(id);
    }
}
